#include <stdio.h>
int main()
{
	
	freopen("zz_test\\test1.in", "r", stdin);
	freopen("zz_test\\test1.out", "w", stdout);
	
	int power = 0;
	scanf("%d", &power);
	double money = 0;
	if ( power > 400 ) {
		money += 150 * 0.4463;
		money += (400 - 150) * 0.4663;
		money += (power - 400) * 0.5663;
	}
	else if ( power > 150 ) {
		money += 150 * 0.4463;
		money += (power - 150) * 0.4663;
	}
	else {
		money += power * 0.4463;	
	}
	printf("%.1lf", money);
	return 0;
} 
